home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 014a / strobe10.zip / INTRO.BAT < prev    next >
DOS Batch File  |  1991-09-05  |  6KB  |  231 lines

  1. ECHO OFF
  2. REM ---------------------------------------------------------------------------
  3. REM  INTRO.BAT - Introduction to Strobe
  4. REM              Copyright (C) 1991 KJL Software. All rights reserved.
  5. REM
  6. REM              *** PLEASE NOTE ***
  7. REM
  8. REM              This batch file requires the following files to be in the
  9. REM              current subdirectory:
  10. REM
  11. REM              SCRSHOW .EXE
  12. REM              INTRO   .SCN
  13. REM              PRINTEXT.EXE
  14. REM ---------------------------------------------------------------------------
  15. :start
  16. scrshow intro.scn /n1 /k
  17. IF ERRORLEVEL 59 GOTO help
  18. IF ERRORLEVEL 8 GOTO info
  19. IF ERRORLEVEL 7 GOTO resident
  20. IF ERRORLEVEL 6 GOTO manual
  21. IF ERRORLEVEL 5 GOTO site
  22. IF ERRORLEVEL 4 GOTO register
  23. IF ERRORLEVEL 3 GOTO readme
  24. IF ERRORLEVEL 2 GOTO install
  25. IF ERRORLEVEL 1 GOTO exit
  26. GOTO start
  27.  
  28. REM ---------------------------------------------------------------------------
  29. REM  HELP - Display help window
  30. REM ---------------------------------------------------------------------------
  31. :help
  32. scrshow intro.scn /n9 /p
  33. GOTO start
  34.  
  35. REM ---------------------------------------------------------------------------
  36. REM  INFO - Display information window
  37. REM ---------------------------------------------------------------------------
  38. :info
  39. scrshow intro.scn /n8 /p
  40. GOTO start
  41.  
  42. REM ---------------------------------------------------------------------------
  43. REM  RESIDENT - Install Strobe into memory
  44. REM ---------------------------------------------------------------------------
  45. :resident
  46. strobe > NUL:
  47. IF ERRORLEVEL 1 GOTO noload
  48. IF ERRORLEVEL 0 GOTO success
  49. GOTO start
  50. REM UNABLE TO LOAD STROBE -----------------------------------------------------
  51. :noload
  52. scrshow intro.scn /n7 /p
  53. GOTO start
  54. REM STROBE LOADED SUCCESSFULLY ------------------------------------------------
  55. :success
  56. scrshow intro.scn /n6 /p
  57. GOTO start
  58.  
  59. REM ---------------------------------------------------------------------------
  60. REM  MANUAL - Print the User's Manual
  61. REM ---------------------------------------------------------------------------
  62. :manual
  63. SET doc$=STROBE.DOC
  64. GOTO print
  65.  
  66. REM ---------------------------------------------------------------------------
  67. REM  SITE - Print the site license
  68. REM ---------------------------------------------------------------------------
  69. :site
  70. SET doc$=SITELICN.DOC
  71. GOTO print
  72.  
  73. REM ---------------------------------------------------------------------------
  74. REM  REGISTER - Print the registration form
  75. REM ---------------------------------------------------------------------------
  76. :register
  77. SET doc$=REGISTER.FRM
  78. GOTO print
  79.  
  80. REM ---------------------------------------------------------------------------
  81. REM  README - Print the README file
  82. REM ---------------------------------------------------------------------------
  83. :readme
  84. SET doc$=README
  85. GOTO print
  86.  
  87. REM ---------------------------------------------------------------------------
  88. REM  PRINT - Print a file, first ask for printer type and port
  89. REM ---------------------------------------------------------------------------
  90. :print
  91. scrshow intro.scn /n4 /k
  92. IF ERRORLEVEL 35 GOTO no_readme
  93. IF ERRORLEVEL 21 GOTO yes_readme
  94. IF ERRORLEVEL 1 GOTO start
  95. GOTO readme
  96.  
  97. REM No graphics characters allowed
  98. :no_readme
  99. SET gfx$=FALSE
  100. GOTO port
  101.  
  102. REM Graphics characters allowed
  103. :yes_readme
  104. SET gfx$=TRUE
  105.  
  106. REM Select printer port
  107. :port
  108. scrshow intro.scn /n5 /k
  109. IF ERRORLEVEL 48 GOTO serial2
  110. IF ERRORLEVEL 30 GOTO serial1
  111. IF ERRORLEVEL 4 GOTO port3
  112. IF ERRORLEVEL 3 GOTO port2
  113. IF ERRORLEVEL 2 GOTO port1
  114. IF ERRORLEVEL 1 GOTO print
  115. GOTO port
  116.  
  117. REM Serial port 2 selected
  118. :serial2
  119. SET prt$=2
  120. GOTO serprtfile
  121.  
  122. REM Serial port 1 selected
  123. :serial1
  124. SET prt$=1
  125. GOTO serprtfile
  126.  
  127. REM Port 3 selected
  128. :port3
  129. SET prt$=3
  130. GOTO prtfile
  131.  
  132. REM Port 2 selected
  133. :port2
  134. SET prt$=2
  135. GOTO prtfile
  136.  
  137. REM Port 1 selected
  138. :port1
  139. SET prt$=1
  140. GOTO prtfile
  141.  
  142. :serprtfile
  143. IF %gfx$% == TRUE printext %doc$% /p COM%prt$% > NUL:
  144. IF %gfx$% == FALSE printext %doc$% /p COM%prt$% /c > NUL:
  145. SET gfx$=
  146. SET prt$=
  147. SET doc$=
  148. GOTO start
  149.  
  150. :prtfile
  151. IF %gfx$% == TRUE printext %doc$% /p LPT%prt$% > NUL:
  152. IF %gfx$% == FALSE printext %doc$% /p LPT%prt$% /c > NUL:
  153. SET gfx$=
  154. SET prt$=
  155. SET doc$=
  156. GOTO start
  157.  
  158. REM ---------------------------------------------------------------------------
  159. REM  INSTALL - Install the Strobe files onto a disk
  160. REM ---------------------------------------------------------------------------
  161. :install
  162. scrshow intro.scn /n2 /k
  163. IF ERRORLEVEL 48 GOTO inst_b
  164. IF ERRORLEVEL 46 GOTO inst_c
  165. IF ERRORLEVEL 36 GOTO inst_j
  166. IF ERRORLEVEL 35 GOTO inst_h
  167. IF ERRORLEVEL 34 GOTO inst_g
  168. IF ERRORLEVEL 33 GOTO inst_f
  169. IF ERRORLEVEL 32 GOTO inst_d
  170. IF ERRORLEVEL 30 GOTO inst_a
  171. IF ERRORLEVEL 23 GOTO inst_i
  172. IF ERRORLEVEL 18 GOTO inst_e
  173. IF ERRORLEVEL 1 GOTO start
  174. GOTO install
  175. :inst_b
  176. SET drv$=B:
  177. GOTO create
  178. :inst_c
  179. SET drv$=C:
  180. GOTO create
  181. :inst_j
  182. SET drv$=J:
  183. GOTO create
  184. :inst_h
  185. SET drv$=H:
  186. GOTO create
  187. :inst_g
  188. SET drv$=G:
  189. GOTO create
  190. :inst_f
  191. SET drv$=F:
  192. GOTO create
  193. :inst_d
  194. SET drv$=D:
  195. GOTO create
  196. :inst_a
  197. SET drv$=A:
  198. GOTO create
  199. :inst_i
  200. SET drv$=I:
  201. GOTO create
  202. :inst_e
  203. SET drv$=E:
  204.  
  205. REM - CREATE A DIRECTORY? -----------------------------------------------------
  206. :create
  207. scrshow intro.scn /n3 /k
  208. IF ERRORLEVEL 35 GOTO crdone
  209. IF ERRORLEVEL 21 GOTO yes_create
  210. IF ERRORLEVEL 1 GOTO install
  211. GOTO create
  212.  
  213. :yes_create
  214. MD %drv$%\STROBE
  215. CD %drv$%\STROBE
  216. GOTO crdone
  217.  
  218. :crdone
  219. CLS
  220. ECHO Copying Strobe files to drive %drv$%
  221. ECHO --------------------------------
  222. COPY *.* %drv$%
  223. SET drv$=
  224. GOTO start
  225.  
  226. REM ---------------------------------------------------------------------------
  227. REM  EXIT - Exit to Operating System
  228. REM ---------------------------------------------------------------------------
  229. :exit
  230. CLS
  231.